package com.zdpx.pxframework.system.api;

import com.zdpx.pxframework.core.vo.PageResult;
import com.zdpx.pxframework.core.vo.Result;
import com.zdpx.pxframework.system.api.entity.OperateLog;
import com.zdpx.pxframework.system.vo.query.OperateLogQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.List;


/**
 * 操作日志 接口Swagger Api
 *
 * @Description:
 * @Author: Cheng Xiaoxiao
 * @Date: 2022-05-24 13:27:17
 */
@Api(tags = "操作日志模块", description = "实现对操作日志数据的基本操作")
public interface OperateLogControllerApi {


    /**
    * 按照条件查询操作日志信息
    *
    * @param operateLogQuery 查询条件
    * @return 结果信息
    */
    @ApiOperation(value = "按照条件查询操作日志信息")
    Result<List<OperateLog>> list(OperateLogQuery operateLogQuery);
    /**
    * 分页及条件查询操作日志信息
    * @param page 页码
    * @param size 分页大小
    * @param  operateLogQuery 查询条件
    * @return 分页结果信息
    */
    @ApiOperation(value = "分页及条件查询操作日志信息")
    Result<PageResult<OperateLog>> search(@ApiParam(name = "page", value = "当前页", required = true, type = "path") Long page,
                                          @ApiParam(name = "size", value = "页码大小", required = true, type = "path") Long size,
                                          OperateLogQuery operateLogQuery);

    /**
     * 根据ID获取操作日志详情
     *
     * @param id 操作日志ID
     * @return 操作日志详细信息
     */
    @ApiOperation(value = "获取单个操作日志详情")
    @ApiParam(name = "id", value = "操作日志ID", required = true, type = "path")
    Result<OperateLog> detail(String id);

    /**
     * 增加操作日志信息
     *
     * @param operateLog 操作日志增加实体
     * @return 增加后的操作日志信息
     */
    @ApiOperation(value = "增加操作日志信息")
    @com.zdpx.pxframework.log.annotations.OperateLog(enable = false)
    Result<OperateLog> add(OperateLog operateLog);

    /**
     * 修改操作日志信息
     *
     * @param id             操作日志ID
     * @param operateLog 操作日志修改实体
     * @return 修改后的操作日志信息
     */
    @ApiOperation(value = "修改操作日志信息")
    Result<OperateLog> updateById(@ApiParam(name = "id", value = "操作日志ID", type = "path") String id, OperateLog operateLog);

    /**
     * 删除操作日志信息
     *
     * @param id 操作日志ID
     * @return 删除结果信息
     */
    @ApiOperation(value = "删除单个操作日志信息")
    Result<Boolean> deleteById(@ApiParam(name = "id", value = "操作日志ID", type = "path") String id);

    /**
     * 删除操作日志信息
     *
     * @param idList 操作日志ID数组
     * @return 删除结果信息
     */
    @ApiOperation(value = "批量删除操作日志信息")
    Result<Boolean> batchRemove(List<String> idList);

}
